package com.qwz.example;

import com.qwz.example.product.ExportBodyModel;
import com.qwz.example.product.ExportFooterModel;
import com.qwz.example.product.ExportHeaderModel;

/**
 * @author Qiuwuzhi
 * @version V1.0
 * @Description:
 * @Package com.qwz.example.Director
 * @date 2019/12/16 14:01
 */
public class Director {
    private Builder builder;

    public Director(Builder builder) {
        this.builder = builder;
    }

    /**
     * 指导生成器最终生成的内容
     * @param headerModel
     * @param bodyModel
     * @param footerModel
     */
    public void construct(ExportHeaderModel headerModel, ExportBodyModel bodyModel, ExportFooterModel footerModel) {
        builder.buildHeader(headerModel);
        builder.buildBody(bodyModel);
        builder.buildFooter(footerModel);
    }
}
